perm filename MRSPL.INF[MRS,LSP] blob
sn#615048 filedate 1981-09-30 generic text, type T, neo UTF8
The MRSPL module allows its user to store information using
Lisp's property list facility instead of the general propositional
representation. The result is an economy of storage and control
of indexing similar to that available in "frame" languages like
RLL and UNITS.
There are two alternative representations in MRSPL. In the
PL representation, a proposition of the form (R A B) is stored by
placing B on A's property list as its R property. In the DL
representation, a proposition of the form (R A B) is stored by
consing B onto the R property of A.
The typical use of the PL representation is in storing unary
functions, like COLOR-OF or FATHER-OF. The typical use of the DL
representation is in storing binary relations, like NEIGHBOR.
Subroutines
pl-stash
pl-unstash
pl-lookup
pl-lookupval
pl-lookupvals
dl-stash
dl-unstash
dl-lookup
dl-lookupval
dl-lookupvals
Typical use:
(load '|<csd.mrs>mrspl.fasl|)
($assert '(all r x y (if (unaryfun r) (MyToStash (r x y) pl-stash))))
($assert '(all r x y (if (unaryfun r) (MyToLookupval (r x y) pl-lookupval))))
($assert '(all r x y (if (binaryrel r) (MyToStash (r x y) dl-stash))))
($assert '(all r x y (if (binaryrel r) (MyToLookupval (r x y) dl-lookupval))))
etc.
($assert '(unaryfun color))
($assert '(color clyde grey))
--> clyde's color property will be grey
($assert '(binaryrel neighbor))
($assert '(neighbor stanford palo-alto))
($assert '(neighbor stanford menlo-park))
--> stanford's neighbor property will be (palo-alto menlo-park)